<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8">
		<link rel="stylesheet" type="text/css" href="styles.css"/>
		<title>We bring consumers to you!</title>
		<script type="text/javascript">
		<!--
			$(document).ready(function(){
			});
			function frmLogin_submit(){
				document.getElementById("frmLogin").submit();
				return false;
			}
			
			function frmLogin_register(){
			}

			function ads_logout(){
				
			}
		-->
		</script>
	</head>
	<body>
		<div id="container" style="width:100%">
			<div id="div_header">
				<?php
					session_start();
					if( !isset($_SESSION["logedUser"]) || $_SESSION["logedUser"]==null){
				?>
				<div id="divLogin" class="divLogin" >
					<form name="frmLogin" id="frmLogin" method="post" action="backend/login.php">
						<table>
							<tr><td>Username </td><td><input type="text" name="txtUsername"/></td></tr>
							<tr><td>Password </td><td><input type="password" name="txtPassword"/></td></tr>
							<tr><td colspan="2" align="center"><a href="javascript:void(0);" onclick="javascript:frmLogin_submit()">login</a>
							<a href="index.php?isreg=1" onclick="frmLogin_register">register</a></td></tr>
						</table>
					</form>
				</div>
				<?php } else { echo "<a href='backend/logout.php'>Logout</a>";} ?>
			</div>
			<div id="divMain">
				<?php
					if(isset($_REQUEST["isreg"]) && $_REQUEST["isreg"]==1){
						include "reg.php";
					}else {
						include "default.php";
					}
				?>
			</div>
			<div id="divFooter" >Copyright @Dao Anh Vu</div>
		</div>
	</body>
</html>